﻿// This code is released under the BSD license.
namespace PugLib.TestCollateral
{
    using System;
    using System.Globalization;

    /// <summary>
    /// Record type for a person.
    /// </summary>
    public class Person
    {
        /// <summary>
        /// Creates a new person object.
        /// </summary>
        public Person()
        {
        }

        /// <summary>
        /// Creates a new person with the given name and age.
        /// </summary>
        /// <param name="name">Name of the person</param>
        /// <param name="age">Age of the person</param>
        /// <remarks>Carries constructor metadata for backwards property mapping.</remarks>
        public Person(string name, int age)
        {
            Name = name;
            Age = age;
        }

        /// <summary>
        /// Gets/sets the person's name.
        /// </summary>        
        public string Name { get; set; }

        public string FirstName { get; set; }
        public string LastName { get; set; }

        /// <summary>
        /// Gets/sets the person's age.
        /// </summary>
        public int Age { get; set; }

        /// <summary>
        /// Provides a string representation of the person.
        /// </summary>
        /// <returns>String representation of the person.</returns>
        public override string ToString()
        {
            return String.Format(CultureInfo.InvariantCulture, "Person {{ Name = {0}, Age = {1} }}", Name, Age);
        }
    }
}